<template>
    <component :is="component"><slot></slot></component>
</template>
<script>
import AndroidStyleScroller from './android_style_scroller'
import IosStyleScroller from './ios_style_scroller'
import {getPhonePlatform} from '@/utils'
export default {
    name: 'Scroller',
    props:{
        type:{
            type:String, //风格化弹性滚动样式 android||ios 未设置自动适配
        }
    },
    setup(props) {
        const platform = getPhonePlatform()
        const component = props.type=='android'?AndroidStyleScroller:(props.type=='ios'?IosStyleScroller:(platform=='android'?AndroidStyleScroller:IosStyleScroller))
        return {
            component
        }
    }
}
</script>